/*
 Navicat MySQL Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50739 (5.7.39)
 Source Host           : localhost:3306
 Source Schema         : fellowmark_schema

 Target Server Type    : MySQL
 Target Server Version : 50739 (5.7.39)
 File Encoding         : 65001

 Date: 28/02/2023 22:22:13
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for assignment
-- ----------------------------
DROP TABLE IF EXISTS `assignment`;
CREATE TABLE `assignment`  (
                               `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                               `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
                               `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL,
                               `name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
                               `module_id` int(10) UNSIGNED NOT NULL,
                               `groupsize` int(11) NOT NULL DEFAULT 1,
                               `deadline` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
                               PRIMARY KEY (`id`) USING BTREE,
                               UNIQUE INDEX `name`(`name`, `module_id`) USING BTREE,
                               INDEX `module_id`(`module_id`) USING BTREE,
                               CONSTRAINT `assignment_ibfk_1` FOREIGN KEY (`module_id`) REFERENCES `module` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of assignment
-- ----------------------------
BEGIN;
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (9, '2023-10-23 15:04:46', '2023-10-23 15:04:46', 'Assigment1', 4, 1, '2023-11-04 15:04:35');
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (10, '2023-10-23 15:16:59', '2023-10-23 15:16:59', 'Assigment2', 4, 3, '2023-12-09 15:16:52');
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (11, '2023-10-23 15:20:46', '2023-10-23 15:20:46', 'Assigment1', 5, 1, '2023-11-11 15:20:44');
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (12, '2023-10-23 15:22:01', '2023-10-23 15:22:01', 'Assigment 1', 6, 1, '2023-11-04 15:22:00');
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (13, '2023-10-23 15:22:31', '2023-10-23 15:22:31', 'Assigment 2', 6, 1, '2023-11-11 15:22:30');
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (14, '2023-10-23 15:24:04', '2023-10-23 15:24:04', 'Assignment 1', 7, 1, '2023-10-28 15:23:53');
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (15, '2023-10-23 15:25:16', '2023-10-23 15:25:16', 'Assignment 2', 7, 1, '2023-11-11 15:25:14');
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (16, '2023-10-23 15:26:39', '2023-10-23 15:26:39', 'Assigment 1', 8, 1, '2023-10-11 15:26:31');
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (17, '2023-10-23 15:27:43', '2023-10-23 15:27:43', 'Assigment 1', 9, 1, '2023-10-31 15:27:42');
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (18, '2023-10-23 15:28:23', '2023-10-23 15:28:23', 'Assigment 2', 9, 1, '2023-11-04 15:28:22');
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (19, '2023-10-23 15:29:08', '2023-10-23 15:29:08', 'Assigment 1', 10, 1, '2023-11-09 15:29:07');
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (20, '2023-10-23 15:30:03', '2023-10-23 15:30:03', 'Assigment 1', 11, 1, '2023-10-26 15:30:02');
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (21, '2023-10-23 15:30:54', '2023-10-23 15:30:54', 'Assigment 1', 12, 1, '2023-12-01 15:30:48');
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (22, '2023-10-23 15:31:56', '2023-10-23 15:31:56', 'Assigment 1', 13, 1, '2023-11-09 15:31:56');
INSERT INTO `assignment` (`id`, `created_at`, `updated_at`, `name`, `module_id`, `groupsize`, `deadline`) VALUES (23, '2023-10-23 15:33:12', '2023-10-23 15:33:12', 'Assigment 1', 14, 1, '2023-10-10 15:33:12');
COMMIT;

-- ----------------------------
-- Table structure for enrollment
-- ----------------------------
DROP TABLE IF EXISTS `enrollment`;
CREATE TABLE `enrollment`  (
                               `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                               `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
                               `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL,
                               `module_id` int(10) UNSIGNED NOT NULL,
                               `student_id` int(10) UNSIGNED NOT NULL,
                               PRIMARY KEY (`id`) USING BTREE,
                               UNIQUE INDEX `module_id`(`module_id`, `student_id`) USING BTREE,
                               INDEX `student_id`(`student_id`) USING BTREE,
                               CONSTRAINT `enrollment_ibfk_1` FOREIGN KEY (`module_id`) REFERENCES `module` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
                               CONSTRAINT `enrollment_ibfk_2` FOREIGN KEY (`student_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of enrollment
-- ----------------------------
BEGIN;
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (1, '2023-03-10 20:58:50', '2023-03-10 20:58:50', 1, 26);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (2, '2023-03-10 20:58:50', '2023-03-10 20:58:50', 1, 25);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (3, '2023-03-10 20:58:50', '2023-03-10 20:58:50', 1, 24);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (4, '2023-03-10 20:58:50', '2023-03-10 20:58:50', 1, 27);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (5, '2023-03-10 20:58:50', '2023-03-10 20:58:50', 1, 28);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (6, '2023-10-23 15:36:09', '2023-10-23 15:36:09', 4, 39);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (7, '2023-10-23 15:36:09', '2023-10-23 15:36:09', 4, 31);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (8, '2023-10-23 15:36:09', '2023-10-23 15:36:09', 4, 33);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (9, '2023-10-23 15:36:09', '2023-10-23 15:36:09', 4, 32);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (10, '2023-10-23 15:36:09', '2023-10-23 15:36:09', 4, 37);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (11, '2023-10-23 15:36:09', '2023-10-23 15:36:09', 4, 38);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (12, '2023-10-23 15:36:09', '2023-10-23 15:36:09', 4, 40);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (13, '2023-10-23 15:36:09', '2023-10-23 15:36:09', 4, 36);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (14, '2023-10-23 15:36:09', '2023-10-23 15:36:09', 4, 34);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (15, '2023-10-23 15:36:09', '2023-10-23 15:36:09', 4, 35);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (16, '2023-10-23 15:37:02', '2023-10-23 15:37:02', 5, 42);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (17, '2023-10-23 15:37:02', '2023-10-23 15:37:02', 5, 43);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (18, '2023-10-23 15:37:02', '2023-10-23 15:37:02', 5, 44);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (19, '2023-10-23 15:37:02', '2023-10-23 15:37:02', 5, 41);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (20, '2023-10-23 15:37:02', '2023-10-23 15:37:02', 5, 45);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (21, '2023-10-23 15:37:02', '2023-10-23 15:37:02', 5, 46);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (22, '2023-10-23 15:37:02', '2023-10-23 15:37:02', 5, 48);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (23, '2023-10-23 15:37:02', '2023-10-23 15:37:02', 5, 47);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (24, '2023-10-23 15:37:02', '2023-10-23 15:37:02', 5, 49);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (25, '2023-10-23 15:37:02', '2023-10-23 15:37:02', 5, 50);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (26, '2023-10-23 15:38:09', '2023-10-23 15:38:09', 6, 31);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (27, '2023-10-23 15:38:09', '2023-10-23 15:38:09', 6, 34);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (28, '2023-10-23 15:38:09', '2023-10-23 15:38:09', 6, 33);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (29, '2023-10-23 15:38:09', '2023-10-23 15:38:09', 6, 35);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (30, '2023-10-23 15:38:09', '2023-10-23 15:38:09', 6, 32);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (31, '2023-10-23 15:38:09', '2023-10-23 15:38:09', 6, 36);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (32, '2023-10-23 15:38:09', '2023-10-23 15:38:09', 6, 38);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (33, '2023-10-23 15:38:09', '2023-10-23 15:38:09', 6, 37);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (34, '2023-10-23 15:38:09', '2023-10-23 15:38:09', 6, 39);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (35, '2023-10-23 15:38:35', '2023-10-23 15:38:35', 9, 33);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (36, '2023-10-23 15:38:35', '2023-10-23 15:38:35', 9, 32);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (37, '2023-10-23 15:38:35', '2023-10-23 15:38:35', 9, 31);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (38, '2023-10-23 15:38:35', '2023-10-23 15:38:35', 9, 36);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (39, '2023-10-23 15:38:35', '2023-10-23 15:38:35', 9, 35);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (40, '2023-10-23 15:38:35', '2023-10-23 15:38:35', 9, 34);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (41, '2023-10-23 15:38:35', '2023-10-23 15:38:35', 9, 39);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (42, '2023-10-23 15:38:35', '2023-10-23 15:38:35', 9, 38);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (43, '2023-10-23 15:38:35', '2023-10-23 15:38:35', 9, 37);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (44, '2023-10-23 15:39:01', '2023-10-23 15:39:01', 10, 31);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (45, '2023-10-23 15:39:01', '2023-10-23 15:39:01', 10, 34);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (46, '2023-10-23 15:39:01', '2023-10-23 15:39:01', 10, 36);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (47, '2023-10-23 15:39:01', '2023-10-23 15:39:01', 10, 32);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (48, '2023-10-23 15:39:01', '2023-10-23 15:39:01', 10, 39);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (49, '2023-10-23 15:39:01', '2023-10-23 15:39:01', 10, 40);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (50, '2023-10-23 15:39:50', '2023-10-23 15:39:50', 11, 32);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (51, '2023-10-23 15:39:50', '2023-10-23 15:39:50', 11, 34);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (52, '2023-10-23 15:39:50', '2023-10-23 15:39:50', 11, 31);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (53, '2023-10-23 15:39:50', '2023-10-23 15:39:50', 11, 33);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (54, '2023-10-23 15:39:50', '2023-10-23 15:39:50', 11, 35);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (55, '2023-10-23 15:39:50', '2023-10-23 15:39:50', 11, 36);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (56, '2023-10-23 15:39:50', '2023-10-23 15:39:50', 11, 42);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (57, '2023-10-23 15:39:50', '2023-10-23 15:39:50', 11, 38);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (58, '2023-10-23 15:39:50', '2023-10-23 15:39:50', 11, 39);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (59, '2023-10-23 15:39:50', '2023-10-23 15:39:50', 11, 37);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (60, '2023-10-23 15:39:50', '2023-10-23 15:39:50', 11, 40);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (61, '2023-10-23 15:39:50', '2023-10-23 15:39:50', 11, 41);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (62, '2023-10-23 15:39:50', '2023-10-23 15:39:50', 11, 43);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (63, '2023-10-23 15:39:50', '2023-10-23 15:39:50', 11, 44);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (64, '2023-10-23 15:39:51', '2023-10-23 15:39:51', 11, 47);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (65, '2023-10-23 15:39:51', '2023-10-23 15:39:51', 11, 45);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (66, '2023-10-23 15:39:51', '2023-10-23 15:39:51', 11, 46);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (67, '2023-10-23 15:40:11', '2023-10-23 15:40:11', 12, 43);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (68, '2023-10-23 15:40:11', '2023-10-23 15:40:11', 12, 45);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (69, '2023-10-23 15:40:11', '2023-10-23 15:40:11', 12, 44);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (70, '2023-10-23 15:40:32', '2023-10-23 15:40:32', 12, 32);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (71, '2023-10-23 15:40:32', '2023-10-23 15:40:32', 12, 33);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (72, '2023-10-23 15:40:32', '2023-10-23 15:40:32', 12, 31);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (73, '2023-10-23 15:41:31', '2023-10-23 15:41:31', 7, 31);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (74, '2023-10-23 15:41:31', '2023-10-23 15:41:31', 7, 33);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (75, '2023-10-23 15:41:31', '2023-10-23 15:41:31', 7, 35);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (76, '2023-10-23 15:41:31', '2023-10-23 15:41:31', 7, 43);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (77, '2023-10-23 15:41:31', '2023-10-23 15:41:31', 7, 37);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (78, '2023-10-23 15:41:31', '2023-10-23 15:41:31', 7, 46);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (79, '2023-10-23 15:41:31', '2023-10-23 15:41:31', 7, 49);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (80, '2023-10-23 15:41:59', '2023-10-23 15:41:59', 8, 36);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (81, '2023-10-23 15:41:59', '2023-10-23 15:41:59', 8, 33);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (82, '2023-10-23 15:41:59', '2023-10-23 15:41:59', 8, 34);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (83, '2023-10-23 15:41:59', '2023-10-23 15:41:59', 8, 32);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (86, '2023-10-23 15:41:59', '2023-10-23 15:41:59', 8, 38);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (89, '2023-10-23 15:41:59', '2023-10-23 15:41:59', 8, 39);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (90, '2023-10-23 15:41:59', '2023-10-23 15:41:59', 8, 40);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (92, '2023-10-23 15:41:59', '2023-10-23 15:41:59', 8, 44);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (93, '2023-10-23 15:41:59', '2023-10-23 15:41:59', 8, 45);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (95, '2023-10-23 15:43:07', '2023-10-23 15:43:07', 13, 32);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (96, '2023-10-23 15:43:07', '2023-10-23 15:43:07', 13, 34);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (97, '2023-10-23 15:43:07', '2023-10-23 15:43:07', 13, 36);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (98, '2023-10-23 15:43:07', '2023-10-23 15:43:07', 13, 35);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (99, '2023-10-23 15:43:07', '2023-10-23 15:43:07', 13, 33);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (100, '2023-10-23 15:43:07', '2023-10-23 15:43:07', 13, 31);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (101, '2023-10-23 15:43:07', '2023-10-23 15:43:07', 13, 37);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (102, '2023-10-23 15:43:07', '2023-10-23 15:43:07', 13, 40);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (103, '2023-10-23 15:43:07', '2023-10-23 15:43:07', 13, 39);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (104, '2023-10-23 15:43:07', '2023-10-23 15:43:07', 13, 38);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (105, '2023-10-23 15:43:16', '2023-10-23 15:43:16', 14, 31);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (106, '2023-10-23 15:43:16', '2023-10-23 15:43:16', 14, 33);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (107, '2023-10-23 15:43:16', '2023-10-23 15:43:16', 14, 34);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (108, '2023-10-23 15:43:16', '2023-10-23 15:43:16', 14, 32);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (109, '2023-10-23 15:43:16', '2023-10-23 15:43:16', 14, 36);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (110, '2023-10-23 15:43:16', '2023-10-23 15:43:16', 14, 35);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (111, '2023-10-23 15:43:16', '2023-10-23 15:43:16', 14, 37);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (112, '2023-10-23 15:43:16', '2023-10-23 15:43:16', 14, 38);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (113, '2023-10-23 15:43:16', '2023-10-23 15:43:16', 14, 39);
INSERT INTO `enrollment` (`id`, `created_at`, `updated_at`, `module_id`, `student_id`) VALUES (114, '2023-10-23 15:43:16', '2023-10-23 15:43:16', 14, 40);
COMMIT;
-- ----------------------------
-- Table structure for grade
-- ----------------------------
DROP TABLE IF EXISTS `grade`;
CREATE TABLE `grade`  (
                          `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                          `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
                          `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL,
                          `pairing_id` int(10) UNSIGNED NOT NULL,
                          `rubric_id` int(10) UNSIGNED NOT NULL,
                          `grade` int(11) NOT NULL,
                          `comment` varchar(1000) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
                          `submission_id` int(11) NULL DEFAULT NULL,
                          PRIMARY KEY (`id`) USING BTREE,
                          UNIQUE INDEX `pairing_id`(`pairing_id`, `rubric_id`) USING BTREE,
                          INDEX `rubric_id`(`rubric_id`) USING BTREE,
                          CONSTRAINT `grade_ibfk_1` FOREIGN KEY (`pairing_id`) REFERENCES `pairing` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
                          CONSTRAINT `grade_ibfk_2` FOREIGN KEY (`rubric_id`) REFERENCES `rubric` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of grade
-- ----------------------------

-- ----------------------------
-- Table structure for review
-- ----------------------------
DROP TABLE IF EXISTS `review`;
CREATE TABLE `review`  (
                           `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                           `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
                           `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL,
                           `pairing_id` int(10) UNSIGNED NOT NULL,
                           `submission_id` int(11) NULL DEFAULT NULL,
                           `review_pdf_annot` LONGBLOB,
                           PRIMARY KEY (`id`) USING BTREE,
                           UNIQUE INDEX `pairing_id`(`pairing_id`, `submission_id`) USING BTREE,
                           CONSTRAINT `review_ibfk_1` FOREIGN KEY (`pairing_id`) REFERENCES `pairing` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for module
-- ----------------------------
DROP TABLE IF EXISTS `module`;
CREATE TABLE `module`  (
                           `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                           `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
                           `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL,
                           `code` varchar(8) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
                           `semester` varchar(40) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
                           `name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
                           PRIMARY KEY (`id`) USING BTREE,
                           UNIQUE INDEX `code`(`code`) USING BTREE,
                           UNIQUE INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of module
-- ----------------------------
BEGIN;
INSERT INTO `module` (`id`, `created_at`, `updated_at`, `code`, `semester`, `name`) VALUES (1, '2023-03-10 20:58:50', '2023-03-10 20:58:50', 'IT5001', 'AY22/23 S1', 'Python');
INSERT INTO `module` (`id`, `created_at`, `updated_at`, `code`, `semester`, `name`) VALUES (2, '2023-10-01 14:43:25', '2023-10-01 14:43:25', 'CS5344', 'AY23/24 S1', 'Big Data');
INSERT INTO `module` (`id`, `created_at`, `updated_at`, `code`, `semester`, `name`) VALUES (3, '2023-10-01 14:45:09', '2023-10-01 14:45:09', '707099', 'AY22/23 S2', 'Programming');
INSERT INTO `module` (`id`, `created_at`, `updated_at`, `code`, `semester`, `name`) VALUES (4, '2023-10-23 14:51:11', '2023-10-23 14:51:11', 'CS1010', 'AY23/24 S1', 'Introduction to Programming');
INSERT INTO `module` (`id`, `created_at`, `updated_at`, `code`, `semester`, `name`) VALUES (5, '2023-10-23 14:56:35', '2023-10-23 14:56:35', 'CS2201', 'AY23/24 S1', 'Data Structures and Algorithms');
INSERT INTO `module` (`id`, `created_at`, `updated_at`, `code`, `semester`, `name`) VALUES (6, '2023-10-23 14:57:13', '2023-10-23 14:57:13', 'CS3203', 'AY23/24 S1', 'Operating Systems Design');
INSERT INTO `module` (`id`, `created_at`, `updated_at`, `code`, `semester`, `name`) VALUES (7, '2023-10-23 14:58:18', '2023-10-23 14:58:18', 'CS4205', 'AY23/24 S1', 'Computer Networks and Security');
INSERT INTO `module` (`id`, `created_at`, `updated_at`, `code`, `semester`, `name`) VALUES (8, '2023-10-23 14:58:34', '2023-10-23 14:58:34', 'CS5202', 'AY23/24 S1', 'Database Systems and Management');
INSERT INTO `module` (`id`, `created_at`, `updated_at`, `code`, `semester`, `name`) VALUES (9, '2023-10-23 14:59:21', '2023-10-23 14:59:21', 'CS5204', 'AY23/24 S1', 'Artificial Intelligence Fundamentals');
INSERT INTO `module` (`id`, `created_at`, `updated_at`, `code`, `semester`, `name`) VALUES (10, '2023-10-23 14:59:37', '2023-10-23 14:59:37', 'CS5209', 'AY23/24 S1', 'Machine Learning and Data Mining');
INSERT INTO `module` (`id`, `created_at`, `updated_at`, `code`, `semester`, `name`) VALUES (11, '2023-10-23 15:00:28', '2023-10-23 15:00:28', 'CS3201', 'AY23/24 S1', 'Distributed Computing Systems');
INSERT INTO `module` (`id`, `created_at`, `updated_at`, `code`, `semester`, `name`) VALUES (12, '2023-10-23 15:00:42', '2023-10-23 15:00:42', 'CS1023', 'AY23/24 S1', 'Web Development Technologies');
INSERT INTO `module` (`id`, `created_at`, `updated_at`, `code`, `semester`, `name`) VALUES (13, '2023-10-23 15:01:34', '2023-10-23 15:01:34', 'MATH2101', 'AY23/24 S1', 'Calculus I: Limits and Continuity');
INSERT INTO `module` (`id`, `created_at`, `updated_at`, `code`, `semester`, `name`) VALUES (14, '2023-10-23 15:01:45', '2023-10-23 15:01:45', 'MATH3205', 'AY23/24 S1', 'Linear Algebra and Differential Equations');
COMMIT;
-- ----------------------------
-- Table structure for pairing
-- ----------------------------
DROP TABLE IF EXISTS `pairing`;
CREATE TABLE `pairing` (
                           `id` int unsigned NOT NULL AUTO_INCREMENT,
                           `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
                           `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                           `assignment_id` int unsigned NOT NULL,
                           `student_id` int unsigned NOT NULL,
                           `marker_id` int unsigned NOT NULL,
                           `active` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0: not reviewed; 1: reviewed; 2: review voided; 3: pending challenge request',
                           `challenge_reason` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
                           PRIMARY KEY (`id`) USING BTREE,
                           UNIQUE KEY `assignment_id` (`assignment_id`,`student_id`,`marker_id`) USING BTREE,
                           KEY `student_id` (`student_id`) USING BTREE,
                           KEY `marker_id` (`marker_id`) USING BTREE,
                           CONSTRAINT `pairing_ibfk_1` FOREIGN KEY (`assignment_id`) REFERENCES `assignment` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
                           CONSTRAINT `pairing_ibfk_2` FOREIGN KEY (`student_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
                           CONSTRAINT `pairing_ibfk_3` FOREIGN KEY (`marker_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=236 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of pairing
-- ----------------------------


-- ----------------------------
-- Table structure for question
-- ----------------------------
DROP TABLE IF EXISTS `question`;
CREATE TABLE `question`  (
                             `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                             `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
                             `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL,
--   `question_number` int(10) UNSIGNED NOT NULL,
                             `question_text` varchar(1000) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
                             `assignment_id` int(10) UNSIGNED NOT NULL,
                             `start_date` TIMESTAMP NULL DEFAULT NULL,
                             `end_date` TIMESTAMP NULL DEFAULT NULL,
                             PRIMARY KEY (`id`) USING BTREE,
--   UNIQUE INDEX `question_number`(`question_number`, `assignment_id`) USING BTREE,
                             INDEX `assignment_id`(`assignment_id`) USING BTREE,
                             CONSTRAINT `question_ibfk_1` FOREIGN KEY (`assignment_id`) REFERENCES `assignment` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of question
-- ----------------------------
BEGIN;
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (27, '2023-10-23 15:13:03', '2023-10-23 15:13:03', 'Explain the concepts of variables and data types in programming languages.', 9, '2023-10-26 15:12:40', '2023-11-01 15:12:40');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (29, '2023-10-23 15:16:27', '2023-10-23 15:16:27', 'Compare and contrast object-oriented and functional programming paradigms.', 9, '2023-11-05 00:00:00', '2023-11-15 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (30, '2023-10-23 15:19:31', '2023-10-23 15:19:31', 'Explain the concept of first-class functions in programming languages.', 10, '2024-01-05 00:00:00', '2024-01-15 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (31, '2023-10-23 15:19:54', '2023-10-23 15:19:54', 'Discuss the evolution of programming languages from low-level to high-level.', 10, '2024-01-10 00:00:00', '2024-01-20 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (32, '2023-10-23 15:21:18', '2023-10-23 15:21:18', 'Implement a binary search tree and perform basic operations.', 11, '2023-11-03 00:00:00', '2023-11-13 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (33, '2023-10-23 15:21:28', '2023-10-23 15:21:28', 'Explain the concept of dynamic programming and provide an example.', 11, '2023-11-07 00:00:00', '2023-11-17 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (34, '2023-10-23 15:22:11', '2023-10-23 15:22:11', 'Discuss the role of virtual memory in modern operating systems.', 12, '2023-11-10 00:00:00', '2023-11-20 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (35, '2023-10-23 15:22:41', '2023-10-23 15:22:41', 'Explain the scheduling algorithms used in operating systems.', 13, '2023-11-12 00:00:00', '2023-11-22 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (36, '2023-10-23 15:24:25', '2023-10-23 15:24:25', 'Explain the concepts of intrusion detection and prevention systems in network security.', 14, '2024-02-05 00:00:00', '2024-02-15 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (37, '2023-10-23 15:24:40', '2023-10-23 15:24:40', 'Discuss the security challenges and solutions in Internet of Things (IoT) networks.', 14, '2024-02-10 00:00:00', '2024-02-20 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (38, '2023-10-23 15:24:54', '2023-10-23 15:24:54', 'Explain the role of cryptography in securing communication over computer networks.', 14, '2024-02-15 00:00:00', '2024-02-25 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (39, '2023-10-23 15:25:24', '2023-10-23 15:25:24', 'Discuss the security considerations in cloud-based network architectures.', 15, '2024-02-20 00:00:00', '2024-03-01 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (40, '2023-10-23 15:26:49', '2023-10-23 15:26:49', 'Design a database schema for an online bookstore inventory management system.', 16, '2023-09-01 00:00:00', '2023-09-15 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (41, '2023-10-23 15:28:02', '2023-10-23 15:28:02', 'Implement a search algorithm (e.g., A* or DFS) to solve the 8-puzzle problem.', 17, '2023-10-01 00:00:00', '2023-10-15 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (43, '2023-10-23 15:28:39', '2023-10-23 15:28:39', 'Discuss the applications of natural language processing (NLP) in real-world scenarios.', 18, '2023-10-10 00:00:00', '2023-10-25 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (44, '2023-10-23 15:29:38', '2023-10-23 15:29:38', 'Implement a clustering algorithm (e.g., K-Means) to group similar data points.', 19, '2023-11-01 00:00:00', '2023-11-15 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (45, '2023-10-23 15:30:30', '2023-10-23 15:30:30', 'Design a distributed file system capable of handling large-scale data storage and retrieval.', 20, '2023-11-20 00:00:00', '2023-12-05 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (46, '2023-10-23 15:31:22', '2023-10-23 15:31:22', 'Develop a responsive web application for an online bookstore.', 21, '2023-12-10 00:00:00', '2023-12-25 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (47, '2023-10-23 15:32:22', '2023-10-23 15:32:22', 'Prove the limit of a function as x approaches a constant value.', 21, '2023-09-05 00:00:00', '2023-09-15 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (48, '2023-10-23 15:32:31', '2023-10-23 15:32:31', 'Prove the limit of a function as x approaches a constant value.', 22, '2023-09-05 00:00:00', '2023-09-15 00:00:00');
INSERT INTO `question` (`id`, `created_at`, `updated_at`, `question_text`, `assignment_id`, `start_date`, `end_date`) VALUES (49, '2023-10-23 15:33:20', '2023-10-23 15:33:20', 'Solve a system of linear equations using matrix methods.', 23, '2023-10-10 00:00:00', '2023-10-25 00:00:00');
COMMIT;

-- ----------------------------
-- Table structure for rubric
-- ----------------------------
DROP TABLE IF EXISTS `rubric`;
CREATE TABLE `rubric`  (
                           `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                           `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
                           `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL,
                           `question_id` int(10) UNSIGNED NOT NULL,
                           `criteria` varchar(1000) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
                           `description` varchar(5000) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
                           `min_mark` int(11) NULL DEFAULT 0,
                           `max_mark` int(11) NULL DEFAULT 10,
                           PRIMARY KEY (`id`) USING BTREE,
                           INDEX `question_id`(`question_id`) USING BTREE,
                           CONSTRAINT `rubric_ibfk_1` FOREIGN KEY (`question_id`) REFERENCES `question` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of rubric
-- ----------------------------
BEGIN;
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (15, '2023-03-12 22:58:13', '2023-03-12 22:58:13', 17, 'cri', 'desc', 1, 2);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (17, '2023-03-12 23:03:23', '2023-03-12 23:03:23', 19, '1', '1', 1, 10);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (24, '2023-09-04 15:30:15', '2023-09-04 15:30:15', 26, '222', '1312', 0, 20);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (25, '2023-10-23 15:13:03', '2023-10-23 15:13:03', 27, 'Correctness, Clarity, Depth of Explanation', 'Write a detailed explanation of variables and data types, including examples in different programming languages.', 0, 10);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (26, '2023-10-23 15:16:27', '2023-10-23 15:16:27', 29, 'In-depth analysis and clear examples for both paradigms.', 'Write an essay discussing the differences between object-oriented and functional programming, providing code examples where applicable.', 0, 15);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (27, '2023-10-23 15:19:31', '2023-10-23 15:19:31', 30, 'Clear explanation and practical examples.', 'Write a detailed explanation of first-class functions, including their significance and usage in different programming paradigms. Provide practical code examples to demonstrate their implementation.', 0, 18);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (28, '2023-10-23 15:19:54', '2023-10-23 15:19:54', 31, 'Historical overview and comparison of language generations.', 'Write an essay tracing the historical development of programming languages, comparing low-level languages like assembly to high-level languages like Python. Discuss the advantages and challenges of each generation.', 0, 22);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (29, '2023-10-23 15:21:18', '2023-10-23 15:21:18', 32, 'Correct implementation and efficient operations.', 'Write a program to create a binary search tree, and implement functions for insertion, deletion, and searching.', 0, 20);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (30, '2023-10-23 15:21:28', '2023-10-23 15:21:28', 33, 'Clear explanation and correct implementation of dynamic programming.', 'Write a detailed explanation of dynamic programming, and provide a working code example demonstrating its usage.', 0, 15);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (31, '2023-10-23 15:22:11', '2023-10-23 15:22:11', 34, 'Comprehensive discussion with relevant examples.', 'Write an essay exploring the concept and importance of virtual memory in operating systems, providing real-world examples.', 0, 18);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (32, '2023-10-23 15:22:41', '2023-10-23 15:22:41', 35, 'Detailed explanation and comparison of different scheduling algorithms.', 'Write a report on various scheduling algorithms such as FCFS, SJF, RR, and Priority Scheduling, comparing their advantages and disadvantages.', 0, 18);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (33, '2023-10-23 15:24:25', '2023-10-23 15:24:25', 36, 'Clear explanation and comparison of detection and prevention methods.', 'Write a detailed explanation of intrusion detection systems (IDS) and intrusion prevention systems (IPS) in network security. Compare different methods and techniques used for detecting and preventing network attacks.', 0, 20);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (34, '2023-10-23 15:24:40', '2023-10-23 15:24:40', 37, 'Identification of challenges and innovative solutions.', 'Write a report analyzing the unique security challenges posed by IoT networks, including device vulnerabilities and data privacy concerns. Propose innovative solutions to enhance the security of IoT devices and networks.', 0, 22);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (35, '2023-10-23 15:24:54', '2023-10-23 15:24:54', 38, 'In-depth explanation and practical examples.', 'Write an essay explaining various cryptographic techniques used to secure data transmission over computer networks. Provide practical examples of encryption and decryption algorithms and their applications in network security.', 0, 18);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (36, '2023-10-23 15:25:24', '2023-10-23 15:25:24', 39, 'Comprehensive analysis and best practices.', 'Write a comprehensive report on security considerations for cloud-based network architectures, including data integrity, availability, and compliance. Discuss best practices for designing secure cloud networks.', 0, 25);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (37, '2023-10-23 15:26:49', '2023-10-23 15:26:49', 40, 'Properly normalized schema and efficient data storage.', 'Design a relational database schema for an online bookstores inventory management system. Include tables for books, authors, genres, and orders. Ensure proper normalization and create SQL queries to manage book inventory, track sales, and generate reports efficiently.', 0, 25);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (38, '2023-10-23 15:28:02', '2023-10-23 15:28:02', 41, 'Correct implementation and optimal solution.', 'Write a program to solve the 8-puzzle problem using a search algorithm such as A* or Depth-First Search. Implement the algorithm and find the optimal solution to the puzzle.', 0, 25);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (40, '2023-10-23 15:28:39', '2023-10-23 15:28:39', 43, 'In-depth analysis and real-world examples.', 'Write a report on the various applications of natural language processing in real-world scenarios. Include examples such as chatbots, sentiment analysis, and language translation. Discuss the challenges and advancements in the field.', 0, 22);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (41, '2023-10-23 15:29:38', '2023-10-23 15:29:38', 44, 'Correct implementation and meaningful clusters.', 'Write a program to implement a clustering algorithm such as K-Means. Apply the algorithm to a dataset and demonstrate meaningful clustering of data points. Discuss the results and potential real-world applications.', 0, 25);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (42, '2023-10-23 15:30:30', '2023-10-23 15:30:30', 45, 'Scalability, fault tolerance, and efficient data access.', 'Design a distributed file system architecture that can handle large-scale data storage and retrieval across multiple nodes. Ensure scalability to accommodate increasing data volumes, fault tolerance to handle node failures, and efficient data access for read and write operations.', 0, 30);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (43, '2023-10-23 15:31:22', '2023-10-23 15:31:22', 46, 'Responsiveness, user interface design, and seamless functionality.', 'Develop a responsive web application for an online bookstore. The application should include features such as user authentication, product browsing, shopping cart management, and order processing. Focus on creating an intuitive user interface and ensuring seamless functionality across different devices and screen sizes.', 0, 35);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (44, '2023-10-23 15:32:22', '2023-10-23 15:32:22', 47, 'Correct mathematical proof and understanding of limit properties.', 'Prove the limit of a given function f(x) as x approaches a constant value c. Use mathematical techniques such as epsilon-delta proofs to demonstrate the behavior of the function around the specified limit point. Explain each step of the proof clearly and concisely.', 0, 20);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (45, '2023-10-23 15:32:31', '2023-10-23 15:32:31', 48, 'Correct mathematical proof and understanding of limit properties.', 'Prove the limit of a given function f(x) as x approaches a constant value c. Use mathematical techniques such as epsilon-delta proofs to demonstrate the behavior of the function around the specified limit point. Explain each step of the proof clearly and concisely.', 0, 20);
INSERT INTO `rubric` (`id`, `created_at`, `updated_at`, `question_id`, `criteria`, `description`, `min_mark`, `max_mark`) VALUES (46, '2023-10-23 15:33:20', '2023-10-23 15:33:20', 49, 'Correct solution, matrix operations, and interpretation of results.', 'Given a system of linear equations, represent it as a matrix and solve for the unknown variables using matrix methods such as Gaussian elimination or matrix inversion. Perform necessary matrix operations and interpret the results in the context of the original problem. Provide a step-by-step solution.', 0, 25);
COMMIT;

-- ----------------------------
-- Table structure for submission
-- ----------------------------
DROP TABLE IF EXISTS `submission`;
CREATE TABLE `submission`  (
                               `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                               `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
                               `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL,
                               `submitted_by_student_id` int(10) UNSIGNED NOT NULL,
--   `question_id` int(10) UNSIGNED NOT NULL,
                               `content_file_loc` varchar(1000) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
--   `content` varchar(5000) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
                               `assignment_id` int(11) NOT NULL,
                               PRIMARY KEY (`id`) USING BTREE,
                               INDEX `submitted_by_student_id`(`submitted_by_student_id`) USING BTREE
--   INDEX `question_id`(`question_id`) USING BTREE,
--   CONSTRAINT `submission_ibfk_1` FOREIGN KEY (`submitted_by_student_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
--   CONSTRAINT `submission_ibfk_2` FOREIGN KEY (`question_id`) REFERENCES `question` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of submission
-- ----------------------------

-- ----------------------------
-- Table structure for supervision
-- ----------------------------
DROP TABLE IF EXISTS `supervision`;
CREATE TABLE `supervision`  (
                                `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                                `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
                                `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL,
                                `module_id` int(10) UNSIGNED NOT NULL,
                                `staff_id` int(10) UNSIGNED NOT NULL,
                                `ta_bool` int(1) NOT NULL DEFAULT 0 COMMENT 'is staff a TA? 0-no 1-yes',
                                PRIMARY KEY (`id`) USING BTREE,
                                UNIQUE INDEX `module_id`(`module_id`, `staff_id`) USING BTREE,
                                INDEX `staff_id`(`staff_id`) USING BTREE,
                                CONSTRAINT `supervision_ibfk_1` FOREIGN KEY (`module_id`) REFERENCES `module` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
                                CONSTRAINT `supervision_ibfk_2` FOREIGN KEY (`staff_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of supervision
-- ----------------------------
BEGIN;
INSERT INTO `supervision` (`id`, `created_at`, `updated_at`, `module_id`, `staff_id`, `ta_bool`) VALUES (1, '2023-10-01 15:03:00', '2023-10-01 15:03:00', 1, 7, 0);
INSERT INTO `supervision` (`id`, `created_at`, `updated_at`, `module_id`, `staff_id`, `ta_bool`) VALUES (3, '2023-10-01 15:03:04', '2023-10-01 15:03:04', 1, 24, 1);
INSERT INTO `supervision` (`id`, `created_at`, `updated_at`, `module_id`, `staff_id`, `ta_bool`) VALUES (4, '2023-10-23 14:51:11', '2023-10-23 14:51:11', 4, 51, 0);
INSERT INTO `supervision` (`id`, `created_at`, `updated_at`, `module_id`, `staff_id`, `ta_bool`) VALUES (5, '2023-10-23 14:56:35', '2023-10-23 14:56:35', 5, 51, 0);
INSERT INTO `supervision` (`id`, `created_at`, `updated_at`, `module_id`, `staff_id`, `ta_bool`) VALUES (6, '2023-10-23 14:57:13', '2023-10-23 14:57:13', 6, 51, 0);
INSERT INTO `supervision` (`id`, `created_at`, `updated_at`, `module_id`, `staff_id`, `ta_bool`) VALUES (7, '2023-10-23 14:58:18', '2023-10-23 14:58:18', 7, 52, 0);
INSERT INTO `supervision` (`id`, `created_at`, `updated_at`, `module_id`, `staff_id`, `ta_bool`) VALUES (8, '2023-10-23 14:58:34', '2023-10-23 14:58:34', 8, 52, 0);
INSERT INTO `supervision` (`id`, `created_at`, `updated_at`, `module_id`, `staff_id`, `ta_bool`) VALUES (9, '2023-10-23 14:59:21', '2023-10-23 14:59:21', 9, 53, 0);
INSERT INTO `supervision` (`id`, `created_at`, `updated_at`, `module_id`, `staff_id`, `ta_bool`) VALUES (10, '2023-10-23 14:59:37', '2023-10-23 14:59:37', 10, 53, 0);
INSERT INTO `supervision` (`id`, `created_at`, `updated_at`, `module_id`, `staff_id`, `ta_bool`) VALUES (11, '2023-10-23 15:00:28', '2023-10-23 15:00:28', 11, 54, 0);
INSERT INTO `supervision` (`id`, `created_at`, `updated_at`, `module_id`, `staff_id`, `ta_bool`) VALUES (12, '2023-10-23 15:00:42', '2023-10-23 15:00:42', 12, 54, 0);
INSERT INTO `supervision` (`id`, `created_at`, `updated_at`, `module_id`, `staff_id`, `ta_bool`) VALUES (13, '2023-10-23 15:01:34', '2023-10-23 15:01:34', 13, 55, 0);
INSERT INTO `supervision` (`id`, `created_at`, `updated_at`, `module_id`, `staff_id`, `ta_bool`) VALUES (14, '2023-10-23 15:01:45', '2023-10-23 15:01:45', 14, 55, 0);
INSERT INTO `supervision` (`id`, `created_at`, `updated_at`, `module_id`, `staff_id`, `ta_bool`) VALUES (15, '2023-10-23 20:24:11', '2023-10-23 20:24:11', 9, 41, 1);
COMMIT;

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu`  (
                             `id` int(11) NOT NULL AUTO_INCREMENT,
                             `pid` int(11) NOT NULL COMMENT 'parent ID',
                             `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'content',
                             `url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'url',
                             `icon` varchar(0) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'menu icon',
                             `code` varchar(125) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Authorization identifier: for backend control class definition. Example:user:list',
                             `type` int(1) NOT NULL DEFAULT 0 COMMENT 'Permission Type: 1-Catalog | 2-Menu-Main Menu | 3-Button | 5-Left Menu',
                             `ord` int(11) NOT NULL DEFAULT 0 COMMENT 'Menu Sort The bigger the value, the higher the front',
                             `status` int(1) NOT NULL DEFAULT 0 COMMENT 'Status: 0-normal | 1-banned | 2-normal with no bans',
                             `deleted` int(1) NOT NULL DEFAULT 0 COMMENT 'is deleted? 0-no 1-yes',
                             `createTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'creation time',
                             `updateTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'updated time',
                             PRIMARY KEY (`id`) USING BTREE,
                             INDEX `idx_pid`(`pid`) USING BTREE,
                             INDEX `idx_url`(`url`(191)) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2002 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'System Menu/Privilege Table' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO `sys_menu` VALUES (1001, 1, 'list assignment', '/assignment/list', NULL, 'assignment:list', 2, 0, 0, 0, '2023-02-11 18:56:11', '2023-02-11 18:56:11');
INSERT INTO `sys_menu` VALUES (2001, 2, 'list grade', '/grade/list', NULL, 'grade:list', 2, 0, 0, 0, '2023-02-11 18:57:08', '2023-02-11 18:57:08');

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role`  (
                             `id` int(11) NOT NULL AUTO_INCREMENT,
                             `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'name',
                             `code` varchar(125) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Key',
                             `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'role description',
                             `deleted` int(1) NOT NULL DEFAULT 0 COMMENT 'is deleted? 0-no 1-yes',
                             `createTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'createTime',
                             `updateTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'updateTime',
                             PRIMARY KEY (`id`) USING BTREE,
                             INDEX `idx_name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'role table' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES (1, 'super-admin', 'super-admin', 'has all permissions', 0, '2023-02-11 19:11:01', '2023-02-11 19:11:01');
INSERT INTO `sys_role` VALUES (2, 'admin', 'admin', 'partly permissions', 0, '2023-02-11 19:10:19', '2023-02-11 19:10:19');
INSERT INTO `sys_role` VALUES (3, 'staff', 'staff', 'staff', 0, '2023-02-11 19:10:21', '2023-02-11 19:10:21');
INSERT INTO `sys_role` VALUES (4, 'student', 'stu', 'student', 0, '2023-02-11 19:10:22', '2023-02-11 19:10:22');

-- ----------------------------
-- Table structure for sys_role_menu_mapping
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu_mapping`;
CREATE TABLE `sys_role_menu_mapping`  (
                                          `id` int(11) NOT NULL AUTO_INCREMENT,
                                          `roleId` int(11) NOT NULL COMMENT 'role id',
                                          `menuId` int(11) NOT NULL COMMENT 'permissions/menu id',
                                          `deleted` int(1) NOT NULL DEFAULT 0 COMMENT 'is deleted? 0-no 1-yes',
                                          `createTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'createTime',
                                          `updateTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'updateTime',
                                          PRIMARY KEY (`id`) USING BTREE,
                                          INDEX `idx_roleId`(`roleId`) USING BTREE,
                                          INDEX `idx_menuId`(`menuId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'Role-permission relationship table' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_role_menu_mapping
-- ----------------------------
INSERT INTO `sys_role_menu_mapping` VALUES (1, 2, 1001, 0, '2023-02-11 19:02:43', '2023-02-11 19:02:43');
INSERT INTO `sys_role_menu_mapping` VALUES (2, 3, 1001, 0, '2023-02-11 19:02:56', '2023-02-11 19:02:56');
INSERT INTO `sys_role_menu_mapping` VALUES (3, 1, 1001, 0, '2023-02-11 19:03:01', '2023-02-11 19:03:01');
INSERT INTO `sys_role_menu_mapping` VALUES (4, 4, 1001, 0, '2023-02-11 19:03:06', '2023-02-11 19:03:06');
INSERT INTO `sys_role_menu_mapping` VALUES (5, 1, 2001, 0, '2023-02-11 19:03:13', '2023-02-11 19:03:13');
INSERT INTO `sys_role_menu_mapping` VALUES (6, 2, 2001, 0, '2023-02-11 19:03:17', '2023-02-11 19:03:17');
INSERT INTO `sys_role_menu_mapping` VALUES (7, 3, 2001, 0, '2023-02-11 19:03:23', '2023-02-11 19:03:23');

-- ----------------------------
-- Table structure for sys_user_role_mapping
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role_mapping`;
CREATE TABLE `sys_user_role_mapping`  (
                                          `id` int(11) NOT NULL AUTO_INCREMENT,
                                          `userId` int(11) NOT NULL COMMENT 'user id',
                                          `roleId` int(11) NOT NULL COMMENT 'role id',
                                          `deleted` int(1) NOT NULL DEFAULT 0 COMMENT 'is deleted? 0-no 1-yes',
                                          `createTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'createTime',
                                          `updateTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'updateTime',
                                          PRIMARY KEY (`id`) USING BTREE,
                                          INDEX `idx_userId`(`userId`) USING BTREE,
                                          INDEX `idx_roleId`(`roleId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'User-Role Relationship Table' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_user_role_mapping
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (1, 1, 1, 0, '2023-02-11 19:00:23', '2023-02-11 19:00:23');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (2, 2, 2, 0, '2023-02-11 19:00:29', '2023-02-11 19:00:29');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (4, 7, 3, 0, '2023-02-11 19:02:10', '2023-02-11 19:02:10');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (6, 24, 4, 0, '2023-02-11 20:03:19', '2023-02-11 20:03:19');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (7, 25, 4, 0, '2023-02-27 16:50:55', '2023-02-27 16:50:55');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (8, 26, 4, 0, '2023-02-27 16:51:06', '2023-02-27 16:51:06');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (9, 27, 4, 0, '2023-02-27 16:51:15', '2023-02-27 16:51:15');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (10, 28, 4, 0, '2023-02-27 16:51:19', '2023-02-27 16:51:19');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (11, 29, 4, 0, '2023-10-23 14:22:09', '2023-10-23 14:22:09');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (12, 30, 4, 0, '2023-10-23 14:23:27', '2023-10-23 14:23:27');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (13, 31, 4, 0, '2023-10-23 14:43:48', '2023-10-23 14:43:48');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (14, 32, 4, 0, '2023-10-23 14:43:59', '2023-10-23 14:43:59');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (15, 33, 4, 0, '2023-10-23 14:44:08', '2023-10-23 14:44:08');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (16, 34, 4, 0, '2023-10-23 14:44:17', '2023-10-23 14:44:17');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (17, 35, 4, 0, '2023-10-23 14:44:25', '2023-10-23 14:44:25');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (18, 36, 4, 0, '2023-10-23 14:44:34', '2023-10-23 14:44:34');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (19, 37, 4, 0, '2023-10-23 14:44:42', '2023-10-23 14:44:42');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (20, 38, 4, 0, '2023-10-23 14:44:53', '2023-10-23 14:44:53');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (21, 39, 4, 0, '2023-10-23 14:45:01', '2023-10-23 14:45:01');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (22, 40, 4, 0, '2023-10-23 14:45:09', '2023-10-23 14:45:09');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (23, 41, 3, 0, '2023-10-23 14:45:18', '2023-10-23 14:45:18');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (24, 42, 4, 0, '2023-10-23 14:45:27', '2023-10-23 14:45:27');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (25, 43, 4, 0, '2023-10-23 14:45:36', '2023-10-23 14:45:36');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (26, 44, 4, 0, '2023-10-23 14:45:45', '2023-10-23 14:45:45');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (27, 45, 4, 0, '2023-10-23 14:45:53', '2023-10-23 14:45:53');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (28, 46, 4, 0, '2023-10-23 14:46:02', '2023-10-23 14:46:02');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (29, 47, 4, 0, '2023-10-23 14:46:10', '2023-10-23 14:46:10');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (30, 48, 4, 0, '2023-10-23 14:46:19', '2023-10-23 14:46:19');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (31, 49, 4, 0, '2023-10-23 14:46:27', '2023-10-23 14:46:27');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (32, 50, 4, 0, '2023-10-23 14:46:35', '2023-10-23 14:46:35');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (33, 51, 3, 0, '2023-10-23 14:46:46', '2023-10-23 14:46:46');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (34, 52, 3, 0, '2023-10-23 14:46:53', '2023-10-23 14:46:53');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (35, 53, 3, 0, '2023-10-23 14:47:01', '2023-10-23 14:47:01');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (36, 54, 3, 0, '2023-10-23 14:47:09', '2023-10-23 14:47:09');
INSERT INTO `sys_user_role_mapping` (`id`, `userId`, `roleId`, `deleted`, `createTime`, `updateTime`) VALUES (37, 55, 3, 0, '2023-10-23 14:47:17', '2023-10-23 14:47:17');
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user`  (
                         `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                         `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
                         `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL,
                         `email` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
                         `name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
                         `password` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
                         `avatar` varchar(2083) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
                         `salt` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
                         PRIMARY KEY (`id`) USING BTREE,
                         UNIQUE INDEX `email`(`email`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 29 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of user
-- ----------------------------
/*
email: superadmin@u.nus.edu, password: superadmin
email: admin@u.nus.edu, password: admin
email: prof@u.nus.edu, password: prof
email: stu4@u.nus.edu, password: stu
email: stu5@u.nus.edu, password: stu
email: stu6@u.nus.edu, password: stu
email: stu1@u.nus.edu, password: stu
email: stu2@u.nus.edu, password: stu
email: ta1@u.nus.edu, password: ta
*/
INSERT INTO `user` VALUES (1, current_timestamp(), current_timestamp(), 'superadmin@u.nus.edu', 'super admin', 'B5B2E6F4F5F5A1CCC73F8F3B79E14479', NULL, '881006D5-393D-422C-8404-5173F29438CD');
INSERT INTO `user` VALUES (2, current_timestamp(), current_timestamp(), 'admin@u.nus.edu', 'admin', '8AF17CDD42B613F815CA9A423B1B37BC', NULL, 'A9EEC3CB-96BE-4FA9-BD71-B848EB6A8806');
BEGIN;
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (1, '2023-03-10 20:58:50', '2023-03-10 20:58:50', 'superadmin@u.nus.edu', 'super admin', 'B5B2E6F4F5F5A1CCC73F8F3B79E14479', NULL, '881006D5-393D-422C-8404-5173F29438CD');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (2, '2023-03-10 20:58:50', '2023-03-10 20:58:50', 'admin@u.nus.edu', 'admin (pwd same as name)', '8AF17CDD42B613F815CA9A423B1B37BC', NULL, 'A9EEC3CB-96BE-4FA9-BD71-B848EB6A8806');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (7, '2023-03-10 20:58:50', '2023-03-10 20:58:50', 'prof@u.nus.edu', 'prof (pwd same as name)', 'B96AA414289C748542F46480BD9DAFCA', NULL, '5E9D0ACB-0252-47C6-9014-CB3EAB8FFCD3');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (24, '2023-03-10 20:58:50', '2023-03-10 20:58:50', 'stu4@u.nus.edu', 'stu (pwd same as name)', 'ED5CEA1C777D2E5271C6908EAF1B00ED', NULL, '798B974B-9D34-4AC5-8CCE-F5CF1783D129');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (25, '2023-03-10 20:58:50', '2023-03-10 20:58:50', 'stu5@u.nus.edu', 'stu5', 'A80C38ECC0BF4B15549571481057CCBF', NULL, '5B4A4943-E936-42E2-B3CC-61EFB15D0E31');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (26, '2023-03-10 20:58:50', '2023-03-10 20:58:50', 'stu6@u.nus.edu', 'stu6', 'B1ED8D00A252F87037CA5C9689A3E15A', NULL, '9929E0E1-0FC6-4BFA-A15F-6059622720CC');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (27, '2023-03-10 20:58:50', '2023-03-10 20:58:50', 'stu1@u.nus.edu', 'stu1', '881209FFEFCBC89648DB79E4C88A3F7F', NULL, '093D8719-73C6-43FE-B073-708D665949C2');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (28, '2023-03-10 20:58:50', '2023-03-10 20:58:50', 'stu2@u.nus.edu', 'stu2', '7E130BBB26AAA06D8B50E626B0BEB17C', NULL, 'A6D245D6-2DDE-40B3-A306-D54DC8357582');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (29, '2023-10-23 14:22:09', '2023-10-23 14:22:09', 'chenruoyisz@gmail.com', 'CHEN RUOYI', '1AEF4A2511B8867521C32C10C4BC9BC9', NULL, 'CB7177DD-B0D7-4427-A1E2-29122A262A93');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (30, '2023-10-23 14:23:27', '2023-10-23 14:23:27', 'yenther@u.nus.edu', 'Goh Yen Ther', 'A83128CFBDBAA88740D9DCFFC24D640B', NULL, 'F7B6C44F-6E53-40CF-AF9E-10785881E521');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (31, '2023-10-23 14:43:48', '2023-10-23 14:43:48', 'john.smith@gmail.com', 'John Smith', '60B57B8A2A78A0FE704D2C848909EEF1', NULL, '7B0BA6C2-97EA-4FB8-A58B-8D6D4A494BF5');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (32, '2023-10-23 14:43:59', '2023-10-23 14:43:59', 'lisa.wong@foxmail.com', 'Lisa Wong', '26DB2ABEE711D469C04E04BB3B495BE6', NULL, 'AFC2D2E2-815C-4E4C-B706-BE14075C78EA');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (33, '2023-10-23 14:44:08', '2023-10-23 14:44:08', 'vikram.kumar@outlook.com', 'Vikram Kumar', 'A386550CA1200BAF03E76FFF8E068B3B', NULL, '1D23FBF4-23FB-449D-B7E1-A58DDAE4BBD8');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (34, '2023-10-23 14:44:17', '2023-10-23 14:44:17', 'emily.jones@yahoo.com', 'Emily Jones', '4CA9D4E1227A6C84446FA6F42824C223', NULL, 'C6D11D0A-CE8A-41E5-9F36-75D54E31A3EB');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (35, '2023-10-23 14:44:25', '2023-10-23 14:44:25', 'wei.liu@163.com', 'Wei Liu', 'F3658785E7DD3DE8093AF810E8CA578D', NULL, 'AFB0A7AE-2B2D-4F84-B8FA-56A6591AFF53');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (36, '2023-10-23 14:44:34', '2023-10-23 14:44:34', 'sarah.nguyen@gmail.com', 'Sarah Nguyen', 'CD3D8D9BF04D20230F90F308786E45F8', NULL, '5ECDEC09-0AEF-498E-817D-4AAE244233AF');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (37, '2023-10-23 14:44:42', '2023-10-23 14:44:42', 'antonio.lopez@hotmail.com', 'Antonio Lopez', '6CF5FCF92254AC15BBEDC8CDC7BC56FC', NULL, '6E16A5A4-49C0-4E67-B64A-FAD6AB032BA8');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (38, '2023-10-23 14:44:53', '2023-10-23 14:44:53', 'priya.sharma@outlook.com', 'Priya Sharma', '2E1BC409BC2C141EE5A4D688687FD7CF', NULL, 'A6F8E23F-E209-4A76-90A1-2C0B7F90C4E9');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (39, '2023-10-23 14:45:01', '2023-10-23 14:45:01', 'michael.brown@gmail.com', 'Michael Brown', '612FD30FE1E306314375218BAD6AC966', NULL, 'A7F5D0F9-4A01-43AB-92F1-0DAB788ABDB7');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (40, '2023-10-23 14:45:09', '2023-10-23 14:45:09', 'jing.xu@qq.com', 'Jing Xu', '86ED2EAE7C653A580960D3F7EB1C8289', NULL, '736B742A-9DD1-4481-9EC8-67CC6EAAA3A1');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (41, '2023-10-23 14:45:18', '2023-10-23 14:45:18', 'olivia.johnson@gmail.com', 'Olivia Johnson', '21DCD012494A739D27DAAA3838CDB164', NULL, '221C8B83-AD80-4821-A27D-C27ABA59A924');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (42, '2023-10-23 14:45:27', '2023-10-23 14:45:27', 'arjun.mahajan@rediffmail.com', 'Arjun Mahajan', '747AD7CB318E8F8FDCDBE7BB668E5C59', NULL, '8DF2CAD1-54FD-4718-AB38-5B2613028F3D');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (43, '2023-10-23 14:45:36', '2023-10-23 14:45:36', 'chloe.tan@gmail.com', 'Chloe Tan', '8D6F0E51071F46F5AB6C2DF7106C8312', NULL, 'FF84FB9A-0D71-4EBC-A4AD-E49FF1E16EB6');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (44, '2023-10-23 14:45:45', '2023-10-23 14:45:45', 'sophia.miller@outlook.com', 'Sophia Miller', 'DC40B9B13239129D2C5A219216258D82', NULL, 'C9216E26-0796-4B2E-8E0B-0E5CFC6F3C8F');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (45, '2023-10-23 14:45:53', '2023-10-23 14:45:53', 'wei.zhang@163.com', 'Wei Zhang', 'C2E169F924A6F77BF711DD5286FECBCD', NULL, '44E43629-CFD1-438E-A185-096E9FD2EF72');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (46, '2023-10-23 14:46:02', '2023-10-23 14:46:02', 'daniel.white@yahoo.com', 'Daniel White', '7B5DF3DB2B5D9E6D93CF018702CDA204', NULL, '7364978A-041A-41A3-9470-AC0306C79D07');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (47, '2023-10-23 14:46:10', '2023-10-23 14:46:10', 'ananya.chopra@gmail.com', 'Ananya Chopra', 'A4C058F5F88E6CC2278A214955B34542', NULL, '1A019C49-177C-42D9-B026-588FC1DE84E4');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (48, '2023-10-23 14:46:19', '2023-10-23 14:46:19', 'alexander.james@gmail.com', 'Alexander James', '778F8AE8C5DF263BAEE9D4D940EDC057', NULL, '8DC9FAA9-492B-4699-A986-7FEB758A51B2');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (49, '2023-10-23 14:46:27', '2023-10-23 14:46:27', 'siobhan.obrien@gmail.com', 'Siobhan OBrien', 'E8CC0D079BED2E2743CB1CCDFC2A4D90', NULL, 'FC0F463B-2D8A-4CC0-BBFE-967C68C55FDA');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (50, '2023-10-23 14:46:35', '2023-10-23 14:46:35', 'wei.li@foxmail.com', 'Wei Li', '24C623B302E59E685E6B362FBE46D068', NULL, 'F736DFA0-ED75-4A04-AC52-D45128F0DA18');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (51, '2023-10-23 14:46:46', '2023-10-23 14:46:46', 'julia.andersen@gmail.com', 'Julia Andersen', 'FE7458814706AA517EC17C551FFF4B7F', NULL, '9B91BBE2-0CDA-40C4-8C30-6FDCD03525D5');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (52, '2023-10-23 14:46:53', '2023-10-23 14:46:53', 'rajan.sharma@outlook.com', 'Rajan Sharma', 'EA564862FA34FDD07344A5ABA7AC0140', NULL, '87039F16-B935-4BA3-96CC-744D5AB78644');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (53, '2023-10-23 14:47:01', '2023-10-23 14:47:01', 'maria.gonzalez@yahoo.com', 'Maria Gonzalez', '45AAAE10F5F3C1105E5D7780F2383224', NULL, '44450EE5-7963-4570-ADC2-55AB0508AF57');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (54, '2023-10-23 14:47:09', '2023-10-23 14:47:09', 'matteo.rossi@libero.it', 'Matteo Rossi', 'FFAC22336B1A293433FA50F8AB42EA93', NULL, 'E37FD2A9-2FAC-4CCE-96ED-FCD20CCAFC9B');
INSERT INTO `user` (`id`, `created_at`, `updated_at`, `email`, `name`, `password`, `avatar`, `salt`) VALUES (55, '2023-10-23 14:47:17', '2023-10-23 14:47:17', 'sakura.tanaka@docomo.ne.jp', 'Sakura Tanaka', '693ED222844E45D409C6A5E0A4D26FC6', NULL, 'B8184386-6AED-4F2F-B939-65677D5537A2');
COMMIT;


DROP TABLE IF EXISTS `final_grade`;
CREATE TABLE `final_grade` (
                               `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                               `assignment_id` int(11) NOT NULL,
                               `stu_id` int(11) NOT NULL,
                               `final_grade` float DEFAULT '0',
                               `peer_grades` varchar(255) DEFAULT NULL COMMENT 'grade1, grade2, grade3..',
                               `participation_grade` float DEFAULT NULL,
                               `percentage_grade` float NOT NULL COMMENT 'avg(peer_grades) / total_grade_in_rubric',
                               `actual_grade` float NOT NULL,
                               PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

DROP TABLE IF EXISTS `grade_calculation_config`;
CREATE TABLE `grade_calculation_config` (
                                            `assignment_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                                            `include_participation` tinyint(1) DEFAULT '0' COMMENT '0: not include participation marks\n1: include',
                                            `ptc_weight` FLOAT DEFAULT '0' COMMENT 'paticipation weights, final grade = ptc_weight * ptc + (1-ptc_weight) * avg_peer_grade',
                                            `include_outliers` tinyint(1) DEFAULT '1' COMMENT '0: detect and remove outliers\n1: include outliers\n',
                                            `include_highest` tinyint(1) DEFAULT '1' COMMENT '0: exclude highest marks\n1: include highest marks',
                                            `include_lowest` tinyint(1) DEFAULT '1' COMMENT '0: exclude lowest marks\n1: include lowest marks',
                                            PRIMARY KEY (`assignment_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

BEGIN;
INSERT INTO `grade_calculation_config` (`assignment_id`, `include_participation`, `ptc_weight`, `include_outliers`, `include_highest`, `include_lowest`) VALUES (2, 0, 0, 1, 1, 1);
COMMIT;



SET FOREIGN_KEY_CHECKS = 1;
